﻿using System.Collections;
using System.Collections.Generic;
using UBlockly.Compotent;
using UnityEngine;
using UBlockly.Scriptable;

namespace UBlockly.UI
{
    /// <summary>
    /// block为空的node
    /// </summary>
    public sealed class EmptyBlockNode : Node
    {
        private IParamGetterCompotent getterComponent;
        internal override bool IsDefaultParamNode => true;

        public EmptyBlockNode(NodeScriptable scriptable, IParamGetterCompotent paramGetter) : base(null, scriptable)
        {
            getterComponent = paramGetter;
        }

        public override void SetParamDisplayValue(IVarObject value)
        {
            string display = IVarObjectHelper.ToDisplayStr(value);
            getterComponent.SetDisplayValue(display);
        }
    }
}

